import request from "umi-request";

const getLangConfig = async (lang: string = 'zh-CN') => {
    return await request('/api/services/app/LangConfig/GetList?lang=' + lang, {
        method: 'GET',
    }).then((response) => {
        let result:any = {};
        var items = response.result.items;
        items.forEach((item: any) => {
            result[item.keyName] = item.keyValue
        });
        return result;
    });
}
export default getLangConfig;